package com.jumi.microservice.order.convert;

import com.jumi.microservice.common.base.dto.BaseRequest;
import com.jumi.microservice.common.base.dto.BaseResponse;
import com.jumi.microservice.dto.order.GoodsSkuRequest;
import com.jumi.microservice.order.context.GoodsSkuContext;
import com.jumi.microservice.order.context.TransHandlerContext;
import org.springframework.beans.BeanUtils;

/**
 * @author Dirk
 * @Date 2020-08-07 10:46
 */
public class GoodsSkuConvert  implements TransConvert {
    @Override
    public TransHandlerContext convertRequest2Ctx(BaseRequest request) {
        GoodsSkuRequest goodsSkuRequest = (GoodsSkuRequest) request;
        GoodsSkuContext goodsSkuContext = new GoodsSkuContext();
        BeanUtils.copyProperties(goodsSkuRequest, goodsSkuContext);
        return goodsSkuContext;
    }

    @Override
    public BaseResponse convertCtx2Response(TransHandlerContext ctx) {
        return null;
    }
}
